<template>
  <div>
        <el-container>
            <!--顶部-->
                <el-header>              
                    <div  class="header" >
                        <el-row>
                            <el-col :span=4 class="headerCol">
                                <el-image :src="require('../../../img/littleIcon/doctorLogo.png')"></el-image>
                            </el-col>
                        </el-row>                  
                    </div>
                </el-header>
                <el-divider></el-divider>
                <el-main>
                    <el-row>
                        <el-col :span="9" offset="3">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                                <el-col :span="2">
                                                    <el-image :src="require('../../../img/health/docment.png')"></el-image>
                                                </el-col>
                                                <el-col :span="9">
                                                    档案号:
                                                </el-col>
                                            </el-row>
                                    </h3>
                                    {{member.filenumber}}
                                </div>
                            </el-card><br>
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                                <el-col :span="2">
                                                    <el-image :src="require('../../../img/health/name.png')"></el-image>
                                                </el-col>
                                                <el-col :span="9">
                                                    姓名:
                                                </el-col>
                                            </el-row>
                                    </h3>
                                    {{member.name}}
                                </div>
                            </el-card><br>
                        </el-col>
                        <el-col :span="9" offset="1">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                            <el-col :span="2">
                                                <el-image :src="require('../../../img/health/IDCard.png')"></el-image>
                                            </el-col>
                                            <el-col :span="9">
                                                身份证:
                                            </el-col>
                                        </el-row>
                                    </h3>
                                    {{member.idcard}}
                                </div>
                            </el-card><br>
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                            <el-col :span="2">
                                                <el-image :src="require('../../../img/health/phone.png')"></el-image>
                                            </el-col>
                                            <el-col :span="9">
                                                手机号:
                                            </el-col>
                                        </el-row>
                                    </h3>
                                    {{member.phonenumber}}
                                </div>
                            </el-card><br>
                        </el-col>
                    </el-row>    
                    <el-row>
                        <el-col :span="9" offset="3">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                            <el-col :span="2">
                                                <el-image :src="require('../../../img/health/status.png')"></el-image>
                                            </el-col>
                                            <el-col :span="9">
                                                婚否:
                                            </el-col>
                                        </el-row>
                                    </h3>
                                    <label v-if='member.tMemberInfo.maritalStatus==1'>是</label>
                                    <label v-if='member.tMemberInfo.maritalStatus==0'>否</label>
                                </div>
                            </el-card><br>
                        </el-col>
                        <el-col :span="9" offset="1">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                            <el-col :span="2">
                                                <el-image :src="require('../../../img/health/height.png')"></el-image>
                                            </el-col>
                                            <el-col :span="9">
                                                身高:
                                            </el-col>
                                        </el-row>
                                    </h3>
                                    {{member.tMemberDynamicinfo.height}}cm
                                </div>
                            </el-card><br>
                        </el-col>
                    </el-row>  
                    <el-row>
                        <el-col :span="9" offset="3">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>
                                        <el-row>
                                            <el-col :span="2">
                                                <el-image :src="require('../../../img/health/kg.png')"></el-image>
                                            </el-col>
                                            <el-col :span="9">
                                                体重:
                                            </el-col>
                                        </el-row>
                                    </h3>
                                    <label>{{member.tMemberDynamicinfo.weight}}Kg</label>
                                </div>
                            </el-card>
                        </el-col>
                    </el-row>        
                </el-main>
        </el-container>

  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
            member:{
                tMemberInfo:{
                    maritalStatus:''
                },
                tMemberDynamicinfo:{
                    height:'',
                    weight:''
                }
            }
        }
    },
    methods:{

    },
    created(){
        this.member=this.$store.state.member
        axios.get("/member/queryByMemerId")
            .then(res => {
                if(res.data.length==0||res.data==null || res.data == ''|| res.data.height == ''|| res.data.weight == ''){
                    this.$router.push("/ko")
                }else{
                    this.$store.commit('memberInit',res.data)
                }
            })
            .catch(err=>{
                this.$router.push("/ko")
                console.log(err)
            })
    }
}
</script>

<style scoped>
    /* .header span{
        height: 40px;
    }
    .header{
        background-color: black;
        font-size: 25px;
        color: white;
        margin-top: 3px;
    } */
    .headerCol{
        margin-top: 10px;
        text-align: left;
    }
    
    .mainDiv{
        border: 1px solid gainsboro;
        background-color: white;
        width: auto;
        height: auto;
    }
    .divImg{
        padding: auto;
    }
    /* .width-row{
        height: 50px;
    } */

    .text {
        font-size: 20px;
    }

    .item {
        padding: 18px 0;
    }

    .box-card {
        width: 500px;
        height: 170px;
        background-color: white;
    }

</style>